﻿using System;
using HotelierChannelManagement.ManagementChannelService.Proxies;

namespace HotelierChannelManagement.ServiceAgents
{
    public class HotelsServiceAgent : IHotelsServiceAgent
    {
        ManagementChannelServiceClient SvcProxy = new ManagementChannelServiceClient();

        #region IHotelServiceAgent Members

        public void GetHotels(EventHandler<GetHotelsCompletedEventArgs> callback)
        {
            SvcProxy.GetHotelsCompleted += callback;
            SvcProxy.GetHotelsAsync();
        }

        public void SaveHotel(Hotel hotel, EventHandler<SaveHotelCompletedEventArgs> callback)
        {
            SvcProxy.SaveHotelCompleted += callback;
            SvcProxy.SaveHotelAsync(hotel);
        }

        #endregion
    }
}
